#统计字符串，有多少个a
name = "asd asd asd asd"
#定义变量 a 用来统计有多少个
count = 0
#用for循环统计 for x in name
for x in name:
    if x=="a":
        count = count +1
print(f"name中有{count}个a字符")